﻿using AjaxPro;
using System;
using System.Data;
using System.Web.UI;
using WorkFlow.DBProxy;

namespace WorkFlow.Desinger
{
    [AjaxNamespace("ns")]
    public partial class Authors : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Utility.RegisterTypeForAjax(GetType(), Page);
        }

        [AjaxMethod]
        public DataTable GetOrgs()
        {
            return DB.MapToDataTable(@"select  f_id as TID,f_name as TNAME from t_organizations");
        }

        [AjaxMethod]
        public DataTable GetRoles()
        {
            return DB.MapToDataTable(@"select f_id as TID,f_name as TNAME from t_roles");
        }

        [AjaxMethod]
        public DataTable GetUsers()
        {
            return DB.MapToDataTable(@"select F_ID AS TID,F_NAME AS TNAME from t_users");
        }
    }
}